package com.geek.controller;

import com.geek.bean.BaseRespVo;
import com.geek.bean.PageData;
import com.geek.model.MarketBrand;
import com.geek.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wbw
 * @data 2024/06/17 14:54
 **/
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {
    @Autowired
    BrandService brandService;

    @GetMapping("list")
    public BaseRespVo list(Integer page,Integer limit){
        PageData data = brandService.listForPage(page,limit);
        return BaseRespVo.ok(data);
    }

    @GetMapping("detail")
    public BaseRespVo detail(Integer id){
        MarketBrand brand = brandService.findById(id);
        return BaseRespVo.ok(brand);
    }
}